<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="__CSS__/style_forum.css">
	<link rel="stylesheet" href="__CSS__/style_login.css">
	<link rel="stylesheet" href="__CSS__/reset.css">
	<title>修改密码 - ThinkPHP</title>
	<script type="text/javascript" src="__JS__/jquery-3.4.1.min.js"></script>
	<script type="text/javascript" src="__JS__/jquery.validate.min.js"></script>
	<script type="text/javascript" src="__JS__/loadinghtml.js"></script>
	<script type="text/javascript" src="__JS__/DropDown.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#user-set").validate({
				rules: {
					oldPa:{
						maxlength:16,
						minlength:6,
						required:true
					},
					newPa1:{
						maxlength:16,
						minlength:6,
						required:true
					},
					newPa2:{
						required:true,
						equalTo:"#newPa1"
					},
					captcha:{
						required:true,
						minlength:5,
						maxlength:5
					}
				},
				messages: {
					oldPa:{
						maxlength:"<span class='tips' id='oldpa' style='float:right;'>密码最多不超过16个字符</span>",
						minlength:"<span class='tips' id='oldpa' style='float:right;'>密码至少为6个字符</span>",
						required:"<span class='tips' id='oldpa' style='float:right;'>请输入原密码</span>"
					},
					newPa1:{
						maxlength:"<span class='tips' id='newpa1' style='float:right;'>密码最多不超过16个字符</span>",
						minlength:"<span class='tips' id='newpa1' style='float:right;'>密码至少为6个字符</span>",
						required:"<span class='tips' id='newpa1' style='float:right;'>请输入新密码</span>"
					},
					newPa2:{
						required:"<span class='tips' id='newpa2' style='float:right;'>请再次输入新密码</span>",
						equalTo:"<span class='tips' id='newpa2' style='float:right;'>两次密码输入不一致</span>"
					},
					captcha:{
						required:"<span class='tips' style='float:right;margin-top:4px;'>请填写验证码</span>",
						minlength:"<span class='tips' style='float:right;margin-top:4px;'>请填写5位验证码</span>",
						maxlength:"<span class='tips' style='float:right;margin-top:4px;'>请填写5位验证码</span>"
					}
				}
			})
			$("#changCaptcha").click(function(){
				$('#codeimg').attr('src',"/11guzp/public/index.php/captcha.html?"+Math.random());
			})
			$('#codeimg').click(function(){
				$(this).attr('src',"/11guzp/public/index.php/captcha.html?"+Math.random());
			})
		})
	</script>
</head>
<body>
	<div id="header" class="top">
		<div id="hd-main">
			<a id="alink" href="{:url('index/index')}" title="返回首页"></a>
			<ul id="main-nav">
				<li><a href="{:url('index/index')}">首页</a></li>
				<li id="triggerdown">
					<a href="{:url('index/view',['s_id'=>0,'ot'=>'m_createat'])}">论坛</a>
					<ul id="dropdown">
						<li><a href="{:url('index/view',['s_id'=>0,'ot'=>'m_createat'])}">全部</a></li>
						{volist name="sec" id="secRow"}
						<li><a href="{:url('index/view',['s_id'=>$secRow.s_id,'ot'=>'m_createat'])}">{$secRow.s_name}</a></li>
						{/volist}
					</ul>
				</li>
				<li style="background-color: #656565"><a href="{:url('index/pa')}">修改密码</a></li>
				<li><a href="{:url('index/me')}">上传头像</a></li>
				<li><a href="{:url('user/login')}">登录</a></li>
				<li><a href="{:url('user/reg')}">注册</a></li>
				<li><a href="{:url('index/logout')}">退出</a></li>
				<li><a href="{:url('user/contact')}">联系我们</a></li>
			</ul>
			<div id="header-bar">
				<h3>欢迎你，{:session('user')}</h3>
				<div id="userloginmes">
					<a href="" id="unlogin">
						<img src="__POT__/{:session('uimg')}" width="24px" height="24px">
					</a>
					<ul>
						<li><a href="{:url('index/collect')}">我的收藏</a></li>
						<li><a href="{:url('index/logout')}">退出</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div id="main">
		<form action="{:url('index/modiPa')}" method="post" id="user-set">
			<div id="login" style="border-right: 0;margin-left: 150px;">
				<div class="login-hd">
					<strong>修改密码</strong>
				</div>
				<table>
					<tr>
						<th>当前用户</th>
						<td><input type="text" name="una" disabled="disabled" value="{:session('user')}"><span></span></td>
					</tr>
					<tr>
						<th>原密码</th>
						<td><input type="password" name="oldPa"><span></span></td>
					</tr>
					<tr>
						<th>新密码</th>
						<td><input type="password" name="newPa1" id="newPa1"><span></span></td>
					</tr>
					<tr>
						<th>确认密码</th>
						<td><input type="password" name="newPa2"><span></span></td>
					</tr>
					<tr>
						<th>验证码</th>
						<td>
							<input type="text" name="captcha" style="width: 100px;" id="code">
							<a id="changCaptcha" href="javascript:void(0);">换一张？</a><span></span>
							<div style="margin-top: 10px;"><img src="{:captcha_src()}" id="codeimg" alt="captcha" /></div>
						</td>
					</tr>
					<tr>
						<th></th>
						<td><input type="submit" value="确定"><input type="reset" value="取消"></td>
					</tr>
				</table>
			</div>
		</form>
	</div>
	<div id="footer"></div>
</body>
</html>